package graphics.base;


/**
 * Created by ephuizi@gmail.com on 2015/11/6.
 */
public class Rectangular {
    public Triangle tri1;
    public Triangle tri2;

    public Rectangular(Triangle tri1, Triangle tri2) {
        this.tri1 = tri1;
        this.tri2 = tri2;
    }

    /**
     * 生成多边形
     *
     * @param a 左下角
     * @param b
     * @param c
     * @param d 右上角
     */
    public Rectangular(Point3D a, Point3D b, Point3D c, Point3D d) {
        this.tri1 = new Triangle();
        tri1.setFirstPoint(a.x, a.y, a.z);
        tri1.setSecodePoint(b.x, b.y, b.z);
        tri1.setThridPoint(d.x, d.y, d.z);
        this.tri2 = new Triangle();
        tri2.setFirstPoint(a.x, a.y, a.z);
        tri2.setSecodePoint(c.x, c.y, c.z);
        tri2.setThridPoint(d.x, d.y, d.z);
    }
}
